﻿@model IEnumerable<Website.Models.Painting>

@{
    ViewBag.Title = "Paintings";
}

<h2>Paintings</h2>
<table>
    <tr>
        <th></th>
        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Year)
        </th>
        <th></th>
    </tr>
    
@foreach (var item in Model) {
    <tr>
        <td>
            <img src="/thumbs/@item.Filename" />
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Year)
        </td>
    </tr>
}
</table>
@Html.ActionLink("Manage", "Manage", "Paintings")
